<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- <table border="1px" width="50%" align="center">
      <tr>
        <td rowspan="2">DD</td>
        <td>SS</td>
      </tr>
      <tr>
        <td>q</td>
      </tr>
      <tr>
        <td colspan="2">www</td>
      </tr>
    </table> -->
    <!-- 
      table创建表格
        tr行 td列
        colspan  列合并  向右合并
        rowspan   行合并 向下合并
     -->

    <table border="1" align="center" width="50%">
      <thead>
        <th>日期</th>
        <th>收入</th>
        <th>支出</th>
        <th>合计</th>
      </thead>
      <tbody>
        <tr>
          <td>2001.1.21</td>
          <td>2000</td>
          <td>2500</td>
          <td>-500</td>
        </tr>
        <tr>
          <td>2001.1.21</td>
          <td>2000</td>
          <td>2500</td>
          <td>-500</td>
        </tr>
        <tr>
          <td>2001.1.21</td>
          <td>2000</td>
          <td>2500</td>
          <td>-500</td>
        </tr>
        <tr>
          <td>2001.1.21</td>
          <td>2000</td>
          <td>2500</td>
          <td>-500</td>
        </tr>
      </tbody>
      <tfoot>
        <tr>
          <td colspan="2">小计</td>
          <td colspan="2">-2000</td>
        </tr>
      </tfoot>
    </table>

    <!-- 
      thead 头部
      tbody 主体
      tfoot 底部

      th头部单元格

     -->
  </body>
</html>
